Integrand size = 29, antiderivative size = 163 \[ \int \frac {(e+f x) \text {csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {2 i (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{a d}-\frac {(e+f x) \coth (c+d x)}{a d}+\frac {2 f \log \left (\cosh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )\right )}{a d^2}+\frac {f \log (\sinh (c+d x))}{a d^2}+\frac {i f \operatorname {PolyLog}\left (2,-e^{c+d x}\right )}{a d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{c+d x}\right )}{a d^2}-\frac {(e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d} \]
[Out]
Time = 0.17 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {5694, 4269, 3556, 4267, 2317, 2438, 3399} \[ \int \frac {(e+f x) \text {csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {2 i (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{a d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{c+d x}\right )}{a d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{c+d x}\right )}{a d^2}+\frac {f \log (\sinh (c+d x))}{a d^2}+\frac {2 f \log \left (\cosh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )\right )}{a d^2}-\frac {(e+f x) \tanh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )}{a d}-\frac {(e+f x) \coth (c+d x)}{a d} \]
[In]
[Out]
Rule 2317
Rule 2438
Rule 3399
Rule 3556
Rule 4267
Rule 4269
Rule 5694
Rubi steps \begin{align*} \text {integral}& = -\left (i \int \frac {(e+f x) \text {csch}(c+d x)}{a+i a \sinh (c+d x)} \, dx\right )+\frac {\int (e+f x) \text {csch}^2(c+d x) \, dx}{a} \\ & = -\frac {(e+f x) \coth (c+d x)}{a d}-\frac {i \int (e+f x) \text {csch}(c+d x) \, dx}{a}+\frac {f \int \coth (c+d x) \, dx}{a d}-\int \frac {e+f x}{a+i a \sinh (c+d x)} \, dx \\ & = \frac {2 i (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{a d}-\frac {(e+f x) \coth (c+d x)}{a d}+\frac {f \log (\sinh (c+d x))}{a d^2}-\frac {\int (e+f x) \csc ^2\left (\frac {1}{2} \left (i c+\frac {\pi }{2}\right )+\frac {i d x}{2}\right ) \, dx}{2 a}+\frac {(i f) \int \log \left (1-e^{c+d x}\right ) \, dx}{a d}-\frac {(i f) \int \log \left (1+e^{c+d x}\right ) \, dx}{a d} \\ & = \frac {2 i (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{a d}-\frac {(e+f x) \coth (c+d x)}{a d}+\frac {f \log (\sinh (c+d x))}{a d^2}-\frac {(e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d}+\frac {(i f) \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{c+d x}\right )}{a d^2}-\frac {(i f) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{c+d x}\right )}{a d^2}+\frac {f \int \coth \left (\frac {c}{2}-\frac {i \pi }{4}+\frac {d x}{2}\right ) \, dx}{a d} \\ & = \frac {2 i (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{a d}-\frac {(e+f x) \coth (c+d x)}{a d}+\frac {2 f \log \left (\cosh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )\right )}{a d^2}+\frac {f \log (\sinh (c+d x))}{a d^2}+\frac {i f \operatorname {PolyLog}\left (2,-e^{c+d x}\right )}{a d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{c+d x}\right )}{a d^2}-\frac {(e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(366\) vs. \(2(163)=326\).
Time = 3.08 (sec) , antiderivative size = 366, normalized size of antiderivative = 2.25 \[ \int \frac {(e+f x) \text {csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {\left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right ) \left (-d (e+f x) \cosh \left (\frac {1}{2} (c+d x)\right ) \left (i+\coth \left (\frac {1}{2} (c+d x)\right )\right )+4 i f \arctan \left (\tanh \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )+2 f \log (\cosh (c+d x)) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )+2 \left (f (c+d x)+(f-i d (e+f x)) \log \left (1-e^{-c-d x}\right )+(f+i d (e+f x)) \log \left (1+e^{-c-d x}\right )-i f \operatorname {PolyLog}\left (2,-e^{-c-d x}\right )+i f \operatorname {PolyLog}\left (2,e^{-c-d x}\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )-4 d (e+f x) \sinh \left (\frac {1}{2} (c+d x)\right )+2 f (c+d x) \left (-i \cosh \left (\frac {1}{2} (c+d x)\right )+\sinh \left (\frac {1}{2} (c+d x)\right )\right )-i d (e+f x) \sinh \left (\frac {1}{2} (c+d x)\right ) \left (-i+\tanh \left (\frac {1}{2} (c+d x)\right )\right )\right )}{2 d^2 (a+i a \sinh (c+d x))} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 333 vs. \(2 (143 ) = 286\).
Time = 2.07 (sec) , antiderivative size = 334, normalized size of antiderivative = 2.05
method | result | size |
risch | \(-\frac {2 i \left (f x \,{\mathrm e}^{2 d x +2 c}+e \,{\mathrm e}^{2 d x +2 c}-2 f x -i {\mathrm e}^{d x +c} f x -2 e -i {\mathrm e}^{d x +c} e \right )}{\left ({\mathrm e}^{2 d x +2 c}-1\right ) \left ({\mathrm e}^{d x +c}-i\right ) a d}+\frac {i c f \ln \left ({\mathrm e}^{d x +c}-1\right )}{d^{2} a}-\frac {i e \ln \left ({\mathrm e}^{d x +c}-1\right )}{d a}+\frac {i e \ln \left ({\mathrm e}^{d x +c}+1\right )}{d a}-\frac {i f \ln \left (1-{\mathrm e}^{d x +c}\right ) c}{d^{2} a}+\frac {f \ln \left ({\mathrm e}^{d x +c}-1\right )}{d^{2} a}+\frac {f \ln \left ({\mathrm e}^{d x +c}+1\right )}{d^{2} a}+\frac {f \ln \left (1+{\mathrm e}^{2 d x +2 c}\right )}{d^{2} a}-\frac {4 f \ln \left ({\mathrm e}^{d x +c}\right )}{d^{2} a}-\frac {i f \ln \left (1-{\mathrm e}^{d x +c}\right ) x}{d a}+\frac {i f \ln \left ({\mathrm e}^{d x +c}+1\right ) x}{d a}+\frac {2 i f \arctan \left ({\mathrm e}^{d x +c}\right )}{d^{2} a}-\frac {i f \operatorname {polylog}\left (2, {\mathrm e}^{d x +c}\right )}{a \,d^{2}}+\frac {i f \operatorname {polylog}\left (2, -{\mathrm e}^{d x +c}\right )}{a \,d^{2}}\) | \(334\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 506 vs. \(2 (139) = 278\).
Time = 0.27 (sec) , antiderivative size = 506, normalized size of antiderivative = 3.10 \[ \int \frac {(e+f x) \text {csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {4 i \, d e - 2 i \, c f + {\left (i \, f e^{\left (3 \, d x + 3 \, c\right )} + f e^{\left (2 \, d x + 2 \, c\right )} - i \, f e^{\left (d x + c\right )} - f\right )} {\rm Li}_2\left (-e^{\left (d x + c\right )}\right ) + {\left (-i \, f e^{\left (3 \, d x + 3 \, c\right )} - f e^{\left (2 \, d x + 2 \, c\right )} + i \, f e^{\left (d x + c\right )} + f\right )} {\rm Li}_2\left (e^{\left (d x + c\right )}\right ) - 2 \, {\left (2 \, d f x + c f\right )} e^{\left (3 \, d x + 3 \, c\right )} - 2 \, {\left (-i \, d f x + i \, d e - i \, c f\right )} e^{\left (2 \, d x + 2 \, c\right )} + 2 \, {\left (d f x - d e + c f\right )} e^{\left (d x + c\right )} - {\left (d f x + d e - {\left (i \, d f x + i \, d e + f\right )} e^{\left (3 \, d x + 3 \, c\right )} - {\left (d f x + d e - i \, f\right )} e^{\left (2 \, d x + 2 \, c\right )} - {\left (-i \, d f x - i \, d e - f\right )} e^{\left (d x + c\right )} - i \, f\right )} \log \left (e^{\left (d x + c\right )} + 1\right ) + 2 \, {\left (f e^{\left (3 \, d x + 3 \, c\right )} - i \, f e^{\left (2 \, d x + 2 \, c\right )} - f e^{\left (d x + c\right )} + i \, f\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + {\left (d e - {\left (c - i\right )} f + {\left (-i \, d e + {\left (i \, c + 1\right )} f\right )} e^{\left (3 \, d x + 3 \, c\right )} - {\left (d e - {\left (c - i\right )} f\right )} e^{\left (2 \, d x + 2 \, c\right )} + {\left (i \, d e + {\left (-i \, c - 1\right )} f\right )} e^{\left (d x + c\right )}\right )} \log \left (e^{\left (d x + c\right )} - 1\right ) + {\left (d f x + c f + {\left (-i \, d f x - i \, c f\right )} e^{\left (3 \, d x + 3 \, c\right )} - {\left (d f x + c f\right )} e^{\left (2 \, d x + 2 \, c\right )} + {\left (i \, d f x + i \, c f\right )} e^{\left (d x + c\right )}\right )} \log \left (-e^{\left (d x + c\right )} + 1\right )}{a d^{2} e^{\left (3 \, d x + 3 \, c\right )} - i \, a d^{2} e^{\left (2 \, d x + 2 \, c\right )} - a d^{2} e^{\left (d x + c\right )} + i \, a d^{2}} \]
[In]
[Out]
\[ \int \frac {(e+f x) \text {csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=- \frac {i \left (\int \frac {e \operatorname {csch}^{2}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx + \int \frac {f x \operatorname {csch}^{2}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx\right )}{a} \]
[In]
[Out]
\[ \int \frac {(e+f x) \text {csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\int { \frac {{\left (f x + e\right )} \operatorname {csch}\left (d x + c\right )^{2}}{i \, a \sinh \left (d x + c\right ) + a} \,d x } \]
[In]
[Out]
\[ \int \frac {(e+f x) \text {csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\int { \frac {{\left (f x + e\right )} \operatorname {csch}\left (d x + c\right )^{2}}{i \, a \sinh \left (d x + c\right ) + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(e+f x) \text {csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\int \frac {e+f\,x}{{\mathrm {sinh}\left (c+d\,x\right )}^2\,\left (a+a\,\mathrm {sinh}\left (c+d\,x\right )\,1{}\mathrm {i}\right )} \,d x \]
[In]
[Out]